# frozen_string_literal: true

module ReactOnRailsPro
  module LicensePublicKey
    # ShakaCode's public key for React on Rails Pro license verification
    # The private key corresponding to this public key is held by ShakaCode
    # and is never committed to the repository
    # Last updated: 2025-10-09 15:57:09 UTC
    # Source: http://shakacode.com/api/public-key
    #
    # You can update this public key by running the rake task:
    #   react_on_rails_pro:update_public_key
    # This task fetches the latest key from the API endpoint:
    #   http://shakacode.com/api/public-key
    #
    # TODO: Add a prepublish check to ensure this key matches the latest public key from the API.
    #       This should be implemented after publishing the API endpoint on the ShakaCode website.
    KEY = OpenSSL::PKey::RSA.new(<<~PEM.strip.strip_heredoc)
            -----BEGIN PUBLIC KEY-----
      MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzcS/fpHz5CbnTQxb4Zot
      khjzXu7xNS+Y9VKfapMaHOMzNoCMfy1++hxHJatRedr+YQfZRCjfiN168Cpe+dhe
      yfNtOoLU9/+/5jTsxH+WQJWNRswyKms5HNajlIMN1GEYdZmZbvOPaZvh6ENsT+EV
      HnhjJtsHl7qltBoL0ul7rONxaNHCzJcKk4lf3B2/1j1wpA91MKz4bbQVh4/6Th0E
      /39f0PWvvBXzQS+yt1qaa1DIX5YL6Aug5uEpb1+6QWcN3hCzqSPBv1HahrG50rsD
      gf8KORV3X2N9t6j6iqPmRqfRcTBKtmPhM9bORtKiSwBK8LsIUzp2/UUmkdHnkyzu
      NQIDAQAB
      -----END PUBLIC KEY-----
    PEM
  end
end
